cc.Class({
    extends: cc.Component,

    properties: {
        join: { default: null, type: cc.Node, displayName: "进入侧边栏按钮" },
        reward: { default: null, type: cc.Node, displayName: "领取奖励按钮" },
    },

    start() {

    },

    close() {
        this.node.active = false;
        this.node.parent = null;
    },

    buttonTouchEventSide: function (e) {
        tt.navigateToScene({
            scene: "sidebar",
            success: (res) => {
                console.log("navigate to scene success");
                this.reward.active = true;
                this.join.active = false;
                this.close();
                // AssetMgr.executeShowPopupWindow(FundStyle.体力, e.node.value, e.node.handler);
                // 跳转成功回调逻辑
            },
            fail: (res) => {
                console.log("navigate to scene fail: ", res);
                // 跳转失败回调逻辑
            },
        });

    },

    getReward: function (e) {
        this.node.active = false;
        this.node.parent = null;
    }
});
